package com.ljc.dao;

import com.ljc.entity.PurchaseApply;
import com.ljc.entity.PurchaseApplyReview;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface PurchaseApplyReviewDao {
    @Insert("insert into purchase_apply_review(opinion,result,purchase_apply_id,operator,date) " +
            "values(#{opinion},#{result},#{purchaseApplyId},#{operator},#{date})")
    void insert(PurchaseApplyReview purchaseApplyReview);

    @Select("select * from purchase_apply_review where purchase_apply_id=#{purchaseId}")
    PurchaseApplyReview searchByPurchaseId(int purchaseId);
}
